<!DOCTYPE html>
<html>
<#include "../../common/header.ftl">
<script src="${basePath}/js/role/list.js?v=201711021700"></script>
<head>
<meta charset="UTF-8">
<title>角色管理</title>
<style>
	.left{
		float:left;
		min-width:100px;
		margin-left: 10px;
	}
	.table-margin{
		margin:5px 3%;
		width:92%;
	}
</style>

</head>
<body>
   
<div class="container" style="margin-left:5%;width:90%">
	<form class="layui-form left" action="#" >
		<div class="layui-form-item ">
		<#if permission?? && (permission.P303??)>
		     <button type="button" class="layui-btn layui-btn-normal" id="add-button">新增角色</button>
	    </#if>
		</div>
	</form>
</div>

<table class="table table-margin">
  <thead>
      <tr>
         <th>名称</th>
         <th>备注</th>
         <th>操作</th>
      </tr>
  </thead>
  <tbody>
	<#list roleList! as role>
		<tr>
			<td>${role.name!}</td>
			<td>${role.remark!}</td>
			<td >
			<div class="btn-group ">
			  <button type="button" class="btn btn-primary dropdown-toggle " data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
			    	操作<span class="caret"></span>
			  </button>
			  <ul class="dropdown-menu">
			  	<#if permission?? && (permission.P304??)>
			   	<li><a href="#" onclick="editFun('${role.id}')">修改</a></li>
			    </#if>
			    <#if permission?? && (permission.P306??)>
			   	<li><a href="#" onclick="deleteFun('${role.id}')">删除</a></li>
			    </#if>
			  </ul>
			</div>
			</td>
		</tr>
	</#list>
  </tbody>
</table>
</body>
<script type="text/javascript">
	var basePath="${basePath}";
	$(function(){
		layui.use(['form', 'layer'] , function(){
		  var layer = layui.layer;
		  var form = layui.form(); 
	});
});
</script>
</html>